<template>
    <div>
        <h3>门店统计列表</h3>
        用户信息：{{UserStore.userinfo.UseName
        }}
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <td>ID</td>
                    <td>会员名称</td>
                    <td>会员手机号</td>
                    <td>门店名称</td>
                    <td>应支付金额</td>
                    <td>实际支付金额</td>
                    <td>支付时间</td>
                    <td>操作</td>
                </tr>
                <tr v-for="item in date.list" :key="item.Id">
                    <td>{{ item.Id }}</td>
                    <td>{{item.UesrName}}</td>
                    <td>{{item.Phone  }}</td>
                    <td>{{ item.ShopName }}</td>
                    <td>{{  item.Money}}</td>
                    <td>{{ item.Pay }}</td>
                    <td>{{ moment(item.PayTime).format("YYYY-MM-DD") }}</td>
                    <td>
                        <input type="button" value="详情" class="btn btn-primary">
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref, reactive, onMounted, useSlots } from 'vue';
import { useRouter, useRoute, routeLocationKey } from 'vue-router';
import moment from 'moment';
import { convertTypeAcquisitionFromJson } from 'typescript';
const route = useRoute();
const router = useRouter();


import{UseUserStore} from '../../stores/user'
const UserStore=UseUserStore();

//生命一个参数
let querinfo=reactive({
    shopId:"",
})
//接收后端返回的数据
let date:any=reactive({
    list:[]
})


onMounted(()=>{
    getList();
})



//获取门店统计列表
const getList=()=>{
    axios({
        method:"get",
        url:"/api/Shops/GetShopCountList",
        params:querinfo
    })
    .then(res=>{
        console.log(res);
        date.list=res.data
    })
    .catch(err=>{
        console.log(err);
    })
}



</script>







<style scoped>

</style>